package com.larly.service;

import com.larly.common.IdRequest;
import com.baomidou.mybatisplus.extension.service.IService;
import com.larly.model.domain.Interactions;
import com.larly.model.dto.Interactions.AddInteractions;
import com.larly.model.dto.Interactions.EditInteractionsRequest;
import com.larly.model.vo.InteractionsVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 许颢达
* @description 针对表【interactions(存储所有针对笔记的互动内容，note_id用于关联笔记但无强制外键约束)】的数据库操作Service
* @createDate 2025-08-20 14:29:44
*/
public interface InteractionsService extends IService<Interactions> {

    /**
     * 添加互动
     */
    Integer addInteractions(AddInteractions addInteractions, HttpServletRequest request);

    /**
     * 展示某篇笔记的所有互动
     */
    List<InteractionsVO> getInteractionsByNoteId(IdRequest idRequest);

    /**
     * 编辑互动
     */
    boolean editInteractions(EditInteractionsRequest editInteractionsRequest, HttpServletRequest request);

    /**
     * 点赞
     */
    boolean likeInteractions(IdRequest idRequest, HttpServletRequest request);

    /**
     * 取消点赞
     */
    boolean cancelLikeInteractions(IdRequest idRequest, HttpServletRequest request);
}
